package p3.view;

import java.awt.BorderLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

public class FieldPanel extends JPanel{

	private static final long serialVersionUID = -6661808099304140607L;

	private JLabel label;
	private JTextField tf_value; 
	
	
	
	public FieldPanel(String name, String value){
		this.setLayout(new BorderLayout());
		label = new JLabel(name);
		this.add(label, BorderLayout.WEST);
		tf_value = new JTextField(value, 5);
		this.add(tf_value, BorderLayout.EAST);
	}
	
	public String getValue(){ return tf_value.getText(); }
	
}
